﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Intranet.Views.ActivityDetailsView>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Details
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
<link rel="stylesheet" type="text/css" media="all" href='<%: Url.Content("~/Content/jsDatePick_ltr.min.css") %>' />
<script type="text/javascript" src='<%: Url.Content("~/Scripts/jsDatePick.min.1.3.js") %>'></script>
<link type="text/css" href='<%: Url.Content("~/Content/jquery-ui-1.8.22.custom/css/ui-lightness/jquery-ui-1.8.22.custom.css") %>' rel="Stylesheet" />	
<script type="text/javascript" src='<%: Url.Content("~/Content/jquery-ui-1.8.22.custom/js/jquery-ui-1.8.22.custom.min.js") %>'></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Activity details</h2>

<% Html.RenderPartial("ActivitySummary", Model.Activity); %>
<table>
<%foreach (var item in Model.Activity.activityNotes)
  {%>
     <tr>
     <td><%:Html.DisplayTextFor(model => item.notes)%></td>
     <td class="rightAlign"><%: Html.ActionLink("Add detail", "ActivityDetail", new { id = item.id })%></td>
     </tr> 
  <%} %>
  
  </table>


    <% using (Ajax.BeginForm("NewNote", "Home", new AjaxOptions { }))
       { %>
       <table>
        <tr>
        <td>
            <%: Html.HiddenFor(model => model.Activity.id)%>
            <%: Html.HiddenFor(model => model.Activity.assignedTo)%>
            Add more details:<input class="activityTextBox focus" name="NewNotes.details" type="text" />
        </td>
        <td class="controls">
            <input type="submit" value="Create" />
        </td>
    </tr>
</table>
<% } %>

</asp:Content>
